/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package experiments;

import java.awt.Color;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author minaev
 */
public class SerDBExp {
    
    public static void main(String[] args) throws ClassNotFoundException, SQLException, IOException {
        Color clr = new Color(255, 254, 253);
        Color clr2;
        
        DBOutputStream dbos = new DBOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(dbos);
        oos.writeObject(clr);
        oos.close();
        
        DBInputStream dbis = new DBInputStream();
        ObjectInputStream ois = new ObjectInputStream(dbis);
        clr2 = (Color)ois.readObject();
        ois.close();
        System.out.println(clr2);
    }

    
}
